get sha1 of file c#

55

get sha1 of file c# -

FileStream fop = File.OpenRead(@"C:\test.bin");
string hash = BitConverter.ToString(System.Security.Cryptography.SHA1.Create().ComputeHash(fop));

get sha1 of file c# -

using(var cryptoProvider = new SHA1CryptoServiceProvider())
{
    string hash = BitConverter
            .ToString(cryptoProvider.ComputeHash(buffer));
}

Comments

Submit
0 Comments